package com.mgkj.dto.yf;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author : ssy
 * @date: 2024-04-25
 * @Description:
 */
@Data
@ApiModel("销货Dto")
public class InitSalesSlipDto implements Serializable {

    private String createBy;
    @ApiModelProperty(value = "签收人")
    @NotBlank(message = "签收人即为创建人")
    private String creator;

    @ApiModelProperty(value = "用户组")
    @JsonProperty("userGroup")
    private String userGroup;

    @ApiModelProperty(value = "创建时间-20250904085156300")
    @JsonProperty("createDate")
    private String createDate;

    @ApiModelProperty(value = "flag")
    @JsonProperty("flag")
    private String flag;

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TG001")
    private String TG001;

    @ApiModelProperty(value = "单号")
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TG002")
    private String TG002;

    @ApiModelProperty(value = "销货日期,前端传-20250904")
    @NotBlank(message = "进货日期不能为空")
    @JsonProperty("TG003")
    private String TG003;

    @ApiModelProperty(value = "客户编号-TN004")
    @NotBlank(message = "客户编号不能为空")
    @JsonProperty("TG004")
    private String TG004;

    @ApiModelProperty(value = "部门编号-TN006")
    @NotBlank(message = "部门编号不能为空")
    @JsonProperty("TG005")
    private String TG005;

    @ApiModelProperty(value = "业务员编号-TN007")
    @NotBlank(message = "业务员编号不能为空")
    @JsonProperty("TG006")
    private String TG006;

    @ApiModelProperty(value = "送货地址/送出的仓库-TN009或TN010")
    @NotBlank(message = "送货地址")
    @JsonProperty("TG009")
    private String TG009;

    @ApiModelProperty(value = "工厂-TN017",required = true)
    @NotBlank(message = "工厂不能为空-TN017")
    @JsonProperty("TG010")
    private String TG010;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "只允许输入N|Y")
    @JsonProperty("TG023")
    private String TG023;

    @ApiModelProperty(value = "公司",required = true)
    @NotBlank(message = "公司不能为空")
    private String company;

    private List<InitSalesSlipBodyDto> initSalesSlipBodyDtos;

    @ApiModelProperty(value = "税种-TN011",required = true)
    @NotBlank(message = "")
    @JsonProperty("TG017")
    private String TG017;

    @ApiModelProperty(value = "币种-TN013",required = true)
    @NotBlank(message = "")
    @JsonProperty("TG011")
    private String TG011 = "";

    @ApiModelProperty(value = "汇率-TN014",required = true)
    @NotBlank(message = "")
    @JsonProperty("TG012")
    private Double TG012;

    @ApiModelProperty(value = "税率-TN030",required = true)
    @NotBlank(message = "")
    @JsonProperty("TG044")
    private Double TG044;


}
